package model;

public class StringTreeElement extends TreeElement {

	private final char character;
	private final TreeElement parent;
	
	public StringTreeElement(final char character, final TreeElement parent) {
		this.character = character;
		this.parent = parent;
	}

	@Override
	public String getString() {
		return this.parent.getString() + this.getCharacter();
	}

	public TreeElement getParent() {
		return parent;
	}

	public char getCharacter() {
		return character;
	}

}
